package JavaSEAdvance.day08_Collection;

/**
 * @author Xiao
 * @date 2021/7/25
 */
@SuppressWarnings("all")
public class D802GeneriTest {
    public static void main(String[] args) {
        GeneriImpl2<String> impl2 = new GeneriImpl2<>();
        impl2.method("hello");  //hello
        GeneriImpl1 impl1 = new GeneriImpl1();
        impl1.method(520);  //520
    }
}
interface GenericityInter<E> {
    void method(E e);
}
class GeneriImpl1 implements GenericityInter<Integer>{
    @Override
    public void method(Integer integer) {
        System.out.println(integer);
    }
}
class GeneriImpl2<E> implements GenericityInter<E> {
    @Override
    public void method(E e) {
        System.out.println(e);
    }
}